package com.nuoniu.sibanyun.mapper.crm;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nuoniu.sibanyun.entity.crm.Approval;
import com.nuoniu.sibanyun.mapper.provider.ApprovalMapperProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * 审批记录 Mapper 接口
 * </p>
 *
 * @author baiqiang
 * @since 2020-06-20
 */
@Mapper
@Component
public interface ApprovalMapper extends BaseMapper<Approval> {

    /**
     * 获取审批记录列表
     * @author 小啊刚
     * @date 2020/7/10
     */
    @SelectProvider(type = ApprovalMapperProvider.class, method = "getList")
    List<Approval> getList(Approval hrApproval);

    @Update("update approval set approval_user_name = #{realName} where approval_user_id = #{id}")
    void updateUserName(String id, String realName);
}
